cmake_minimum_required(VERSION 3.19)
project(CForNdk)

set(CMAKE_CXX_STANDARD 14)

# ffmpeg start
# 1.设置头文件查找文件
# ffmpeg
# include_directories("D:/DevTools/ffmpeg-20180813-551a029-win64-dev/include")
# jni
include_directories("/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home/include")
include_directories("/Library/Java/JavaVirtualMachines/jdk1.8.0_291.jdk/Contents/Home/include/darwin")

# 2.设置库的查找位置
# link_directories("D:/DevTools/ffmpeg-20180813-551a029-win64-dev/lib")

# 给jni使用，需要生成一个库，so动态库
# SHARED 库的类型，给java调用,此时是win环境的java调用使用dll库，android、linux使用so库
# add_library(Jni SHARED project/_02jnitest.cpp)

# 将源文件添加到此项目的可执行文件，生成一个可执行程序
add_executable(CForNdk
        cstudy/_01basic.cpp
        cstudy/_02memory.cpp
        cstudy/_03_1pointer.cpp
        cstudy/_03_2pointer.cpp
        cstudy/_04_1function.cpp
        cstudy/_04_2function_pointer.cpp
        cstudy/_05preprocessor.cpp
        cstudy/_06struct.cpp
        cstudy/_07union.cpp
        cppstudy/_01basic.cpp
        cppstudy/_01basic.c
        cppstudy/_01basic.h cppstudy/_02namespace.cpp project/_01ffmpeg_demo.cpp cppstudy/_03class.cpp cppstudy/class/Student.cpp cppstudy/class/Student.h cppstudy/class/Instance.cpp cppstudy/class/Instance.h cppstudy/_04new_malloc.cpp cppstudy/_05extend.cpp project/_02jnitest.cpp cppstudy/_06container.cpp cppstudy/_07thread.cpp)

# 3.设置编译链接的库 ffmpeg
# target_link_libraries(CForNdk avcodec avdevice avfilter avformat avutil postproc swresample swscale)